﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace console.demo.linq
{

    public class LinqSet
    {

        public void Get()
        {
            string[] planets = { "Mercury", "Venus", "Venus", "Earth", "Mars", "Earth" };
            IEnumerable<string> query = from planet in planets.Distinct() select planet;
            foreach (string str in query)
            {
                Console.WriteLine(str);
            }
        }
    }
}

